//
//  WMECludModel.m
//  everyDay_duiTang
//
//  Created by 恩叔 on 16/1/21.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMECludModel.h"

@implementation WMECludModel

- (void)dealloc
{
    [_selfId release];
    [_content release];
    [_userName release];
    [_userId release];
    [_userAvatar release];
    [_width release];
    [_height release];
    [_path release];
    [_tagsId release];
    [_tagsName release];
    [_cludName release];
    [_cludId release];
    [_active_time release];
    [_add_datetime_ts release];
    [_comment_count release];
    [super dealloc];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"sender"]) {
        self.userName = value[@"username"];
        self.userId = value[@"id"];
        self.userAvatar = value[@"avatar"];
    }
    if ([key isEqualToString:@"club"]) {
        self.cludId = value[@"id"];
        self.cludName = value[@"name"];
    }
    if ([key isEqualToString:@"id"]) {
        self.selfId = value;
    }
    if ([key isEqualToString:@"tags"]) {
        for (NSDictionary *temp in value) {
            self.tagsId = temp[@"id"];
            self.tagsName = temp[@"name"];
        }
    }
    if ([key isEqualToString:@"photos"]) {
        for (NSDictionary *dic in value) {
            self.width = dic[@"width"];
            self.height = dic[@"height"];
            self.path = dic[@"path"];
        }
    }
}
@end
